package com.byxm.wlgw.query;

public class SpppQuery extends BaseQuery{
	public SpppQuery(String sTableNm) {
		super(sTableNm);
	
	}
	public String getSpppSql(int splbfid){
		StringBuffer sql = new StringBuffer();
		sql.append("select * from sppp where 1=1");
		if(splbfid!=0){
			sql.append(" and splbfid=").append(splbfid);
		}
		sql.append(" order by px");
		return sql.toString();
	}
	public String getSaveSql(){
		StringBuffer sql = new StringBuffer();
		sql.append("insert into sppp(spppm,splbfid,px)values(?,?,?)");
		return sql.toString();
	}
	/**
	 * 通过商品品牌名查看他
	 * @param spppm
	 * @return
	 */
	public String findSpppBySpppm(String spppm){
		StringBuffer sql=new StringBuffer();
		sql.append("select * from sppp where spppm='").append(spppm).append("'");
		return sql.toString();
	}
	/**
	 * update商品品牌
	 */
	public String updateSppp(){
		StringBuffer sql=new StringBuffer();
		sql.append("update sppp set splbfidvar=? where spppid=?");
		return sql.toString();
	}
}
